This application claims priority from Chinese Patent Provisional Application No. 200410012658.0, filed on Jan. 14, 2004, and Korean Patent Application No. 10-2005-0002802, filed on Jan. 12, 2005, in the Korean Intellectual Property Office, the disclosures of which are incorporated herein in their entirety by reference.
1. Field of the Invention
The present invention relates to video coding, and more particularly, to a loop filtering method and a loop filter.
2. Description of the Related Art
In video coding, an image is divided into blocks for processing. During such video coding, a blocking effect and a ringing effect may occur after a discrete cosine transform (DCT) and quantization are performed. The degrees of the blocking effect and the ringing effect are different in each block.
Typical problems caused by the blocking effect are grid noise and staircase noise. Such noise causes a detectable edge of an image and may even cause a block border to appear. The ringing effect may bring about a loop effect in a region ranging from the upper left portion to the lower right portion of the image, which results in the appearance of a plurality of images overlapping each other.
The blocking effect is usually caused by a quantization error that occurs when quantization is performed in each block. When the blocking effect occurs, two forms, i.e., grid noise and staircase noise, having different image contents appear in a single block region.
Staircase noise appears at a strong edge of an image. Since a large number of high-frequency coefficients in DCT are quantized to zero, the strong edge cannot be perfectly converted into a digital format in a transform field. In addition, since an image is processed in block units during video coding, continuity of the strong edge is not secured at a block boundary. As a result, sawtooth noise occurs at the strong edge of the image and an unnatural edge of a data block referred to as staircase noise appears.
Grid noise appears in a flat area of an image. Since rounding off is performed in the flat area of the image where brightness gradually increases or decreases during quantization, a direct current (DC) coefficient in a region where DCT is performed may exceed a determination thresholds value used to determine an adjacent quantization level, which may cause a sudden difference in brightness between two adjacent blocks of an image to be reconstructed. As a result, a profile referred to as grid noise visually appears as a strip shape.
To eliminate the blocking effect and ringing effect, it is necessary to remove the blocking effect from an image before the image is encoded or stored as a reference frame for a subsequent frame.
A loop filter reduces a blocking effect and a ringing effect during image encoding. A loop filter can reduce a blocking effect and partially remove a ringing effect. A loop filter achieves this by performing smooth filtering on values of pixels between adjacent pixels on opposite sides of a block boundary. Such a loop filtering algorithm has been combined with one of the latest international standards H.264.
However, conventional loop filtering is performed without considering the characteristics (e.g., characteristic edges) of an image at a block boundary, and therefore, is not suitable for high-definition digital TV which has a high resolution and a high bit rate. In other words, in high-definition digital TV, a large change occurs at a block boundary and it is necessary to not perform loop filtering or to slightly perform loop filtering sometimes. The conventional loop filtering does not consider these factors at all.
In particular, China started to design its own international video and audio coding standards in 2002. These standards include a video coding standard for high-definition digital TV (i.e., HDTV) under discussion. Accordingly, the conventional loop filtering is not appropriate for coders utilizing Chinese digital audio and video coding standards.